#include "setargumentswidget.h"
#include "ui_setargumentswidget.h"
#include "tools/aqp/aqp.hpp"

SetArgumentsWidget::SetArgumentsWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::SetArgumentsWidget)
{
    ui->setupUi(this);
    connect(ui->pushButton,SIGNAL(clicked()),this,SLOT(slt_okButton()));
    // ui->comboBox->addItem(trUtf8("0x01"));
}

SetArgumentsWidget::~SetArgumentsWidget()
{
    delete ui;
}

/**
 * @brief SetArgumentsWidget::slt_okButton
 * modify by zhou xiang 2013-12-13
 */
void SetArgumentsWidget::slt_okButton()
{

    int flag = ui->comboBox->currentIndex() + 1;
    if (ui->spinBox->value() > ui->spinBox_2->value()) {
        AQP::information(this,trUtf8("出错！"),trUtf8("!!!!!!!!!!!!"));
    } else {
        Filter f(flag,ui->spinBox->value(),ui->spinBox_2->value());
        emit sig_Afilter(f);
    }

}

